#pragma once
#include "CRendererIncludes.h"
#include <vector>
using namespace std;

class CAssetManager_AL
{
private:
	vector<IDirect3DTexture9*>				m_vTextures;

	vector<IDirect3DVertexBuffer9*>			m_vVertBuffers;
	vector<IDirect3DVertexDeclaration9*>	m_vVertDecls;
	vector<IDirect3DIndexBuffer9*>			m_vIndexBuffers;

	vector<ID3DXEffect*>					m_vEffects;

	void CreateCube();
	void LoadEffects();
public:
	CAssetManager_AL();
	~CAssetManager_AL();

	static CAssetManager_AL* GetInstance();

	int CreateTexture(string _szTexturePath);
	IDirect3DTexture9* GetTexture(int _nID);

	int AddTexture(IDirect3DTexture9* texture);
	int AddVertBuff(IDirect3DVertexBuffer9* buff);
	int AddVertDecl(IDirect3DVertexDeclaration9* decl);
	int AddIndexBuff(IDirect3DIndexBuffer9* indexbuff);
	int AddEffect(ID3DXEffect* effect);

	ID3DXEffect* GetEffect(int _nIndex)	{ return m_vEffects[_nIndex]; }
	IDirect3DVertexBuffer9* GetVertBuff(int _nIndex) { return m_vVertBuffers[_nIndex]; }
	IDirect3DVertexDeclaration9* GetVertDecl(int _nIndex) { return m_vVertDecls[_nIndex]; }
	IDirect3DIndexBuffer9* GetIndextBuff(int _nIndex) { return m_vIndexBuffers[_nIndex]; }
};